/**
 * 积分来源类型枚举
 */
export enum PointsSourceType {
    /** 充值赠送 */
    RECHARGE_GIFT = '充值赠送',
    /** 消费赠送 */
    CONSUMPTION_GIFT = '消费赠送',
    /** 活动赠送 */
    ACTIVITY_GIFT = '活动赠送',
    /** 生日赠送 */
    BIRTHDAY_GIFT = '生日赠送',
    /** 会员等级赠送 */
    MEMBERSHIP_GIFT = '会员等级赠送',
    /** 推荐奖励 */
    REFERRAL_REWARD = '推荐奖励',
    /** 签到奖励 */
    CHECK_IN_REWARD = '签到奖励',
    /** 手动调整 */
    MANUAL_ADJUSTMENT = '手动调整',
    /** 系统赠送 */
    SYSTEM_GIFT = '系统赠送',
    /** 其他 */
    OTHER = '其他'
}

/**
 * 积分来源类型选项
 */
export const pointsSourceTypeOptions = [
    { label: '充值赠送', value: PointsSourceType.RECHARGE_GIFT },
    { label: '消费赠送', value: PointsSourceType.CONSUMPTION_GIFT },
    { label: '活动赠送', value: PointsSourceType.ACTIVITY_GIFT },
    { label: '生日赠送', value: PointsSourceType.BIRTHDAY_GIFT },
    { label: '会员等级赠送', value: PointsSourceType.MEMBERSHIP_GIFT },
    { label: '推荐奖励', value: PointsSourceType.REFERRAL_REWARD },
    { label: '签到奖励', value: PointsSourceType.CHECK_IN_REWARD },
    { label: '手动调整', value: PointsSourceType.MANUAL_ADJUSTMENT },
    { label: '系统赠送', value: PointsSourceType.SYSTEM_GIFT },
    { label: '其他', value: PointsSourceType.OTHER }
];

/**
 * 获取积分来源类型标签
 * @param sourceType 积分来源类型
 * @returns 积分来源类型标签
 */
export function getPointsSourceTypeLabel(sourceType: string): string {
    const option = pointsSourceTypeOptions.find(opt => opt.value === sourceType);
    return option ? option.label : sourceType;
} 